package com.zack.shop.mvp.model;

import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.zack.shop.mvp.contract.MyMoneyContract;
import com.zack.shop.mvp.http.api.service.MyMoneyService;
import com.zack.shop.mvp.http.entity.BaseResponse;

import io.reactivex.Observable;
import okhttp3.RequestBody;


/**
 * @Author 张迁-zhangqian
 * @Data 2018/5/30 下午5:29
 * @Package com.zack.shop.mvp.model
 **/
public class MoneyModel extends BaseModel implements MyMoneyContract.Model {
    public MoneyModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }


    @Override
    public Observable<BaseResponse> myBalance(RequestBody info) {
        return mRepositoryManager.obtainRetrofitService(MyMoneyService.class)
                .myBalance(info);
    }

    @Override
    public Observable<BaseResponse> recharge(RequestBody info) {
        return mRepositoryManager.obtainRetrofitService(MyMoneyService.class)
                .recharge(info);
    }
}
